import request from '@/utils/Request'
import { stringify } from 'qs';

export async function queryList(params) {
  return request(`/joker/route/queryList?${stringify(params)}`, {
    method: 'GET'
  });
}

export async function queryAll() {
  return request(`/joker/route/queryAll`, {
    method: 'GET'
  });
}

export async function add(params) {
  return request(`/joker/route/add`, {
    method: 'POST',
    data: {
      ...params
    }
  });
}

export async function update(params) {
  return request(`/joker/route/update`, {
    method: 'POST',
    data: {
      ...params
    }
  });
}

export async function deleteById(params) {
  return request(`/joker/route/delete?${stringify(params)}`, {
    method: 'GET'
  });
}
